<template>
    <div class="data-content" style="padding:0 15px">
        <el-table :data="hmd" border style="width: 100%">
            <el-table-column prop="deptname" label="企业名称" width="400" >
            </el-table-column>
            <el-table-column prop="persontype" label="当事人类型" width="300" >
            </el-table-column>
            <el-table-column prop="grade" label="量化分值">
            </el-table-column>
        
        </el-table>
        <el-pagination
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
            :page-sizes="[10, 15, 20]"
            :page-size="size"
            layout="total, sizes, prev, pager, next"
            style="text-align:right; margin-top:1em;"
            :total="total">
        </el-pagination>
    </div>
</template>

<script>
export default {
    props: {
        companyName: {
            type: String,
            default: "",
        },
        projectId: {
            type: String,
            default: "",
        },
    },
    data: () => ({
        hmd: [],
        current: 1,
        size: 10,
        pages: "",
        total: null,
    }),
    methods: {
        handleSizeChange: function (pageSize) {
            this.size = pageSize;
            this.getResultList();
        },
        handleCurrentChange: function (pageNum) {
            this.current = pageNum;
            this.getResultList();
        },

        // 获取 四库一平台人员 列表
        getResultList: function () {
            // let loading = this.$loading({
            //     lock: true,//lock的修改符--默认是false
            //     text: 'Loading',//显示在加载图标下方的加载文案
            //     spinner: 'el-icon-loading',//自定义加载图标类名
            //     background: 'rgba(0, 0, 0, 0.5)',//遮罩层颜色
            //     // target: document.querySelector('#table')//loadin覆盖的dom元素节点
            // });
            let dataList = {
                    page:{
                        current: this.current,
                        size: this.size,
                    },
                    corpName: this.companyName,
                    projectId: this.projectId,
    
            }
            let that = this;
            this.$post(
                `${that.$store.state.api.searchUrl}/searchblack/hubeiblack`,
                dataList,
                (data) => {
                    // loading.close()
                    that.hmd = data.rows
                    that.total = data.total
                },
                true
            )
        },
    },
    mounted() {
        this.getResultList();
    },
};
</script>

<style scoped lang="scss">
.company-right table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    ::v-deep tr th {
        background: #f1f7fd;
        color: #236ac4;
        font-weight: 400;
        padding: 10px 0;
        text-align: center;
        border: 1px solid #a4bee3;
    }
    ::v-deep td {
        border: 1px solid #a4bee3;
        padding: 10px 0px;
        font-size: 14px;
    }
    ::v-deep #commonClass {
        background: #4396de;
        color: #fff;
        font-size: 16px;
        text-align: center;
        height: 40px;
        line-height: 40px;
    }
    ::v-deep td:nth-child(odd) {
        text-align: center;
    }
    ::v-deep td:nth-child(even) {
        text-align: center;
    }
}
.company_tabs {
    margin: 0 15px;
    background: #206bc6;
    margin-top: 10px;
    ::v-deep span {
        display: inline-block;
        text-align: center;
        height: 36px;
        line-height: 36px;
        color: #fff;
        padding: 0px 20px;
        background: #206bc6;
        font-size: 15px;
    }
    ::v-deep .active {
        text-decoration: none;
        background: #4396de;
        box-sizing: border-box;
        border-bottom: 2px solid #eea108;
    }
}
</style>
